<?php
require_once("function.php");
if(isset($_POST['url'])){
	$url = $_POST['url'];
	$noidung = MyFunctions::get_content_by_url($url);
		$content = MyFunctions::get_content_by_tag($noidung, "<div class=\"content\">");
		$title =   MyFunctions::get_content_by_tag($noidung, "<H1 class=Title>");
	$tomtat =  MyFunctions::get_content_by_tag($noidung, "<H2 class=Lead>");
	$p = strpos($content, $tomtat, 0);	
	if($p>0){
	
		$content = substr($content, $p+strlen($tomtat));
		$tomtat = MyFunctions::get_content_by_tag($tomtat, "<H2 class=Lead>");

	}
	$content = MyFunctions::fix_src_img_tag($content, "http://vnexpress.net");
	echo "{$title}---+++---+++{$tomtat}---+++---+++{$content}---+++---+++$url";
}
?>